|
LotusScript library: LSALibOCRun |
| Uses |
LSALibFct LSALibMsgHOCRun LSALibOCIMgr LSALibOFMgr
|
OCRun runtime environment for optimized Instances created by "OCards",
a tool for specification of objects and code generation. It provides general routines
for
- Getting and setting properties
- Late binding of the attributes to the fields of a document
The key is the list structure "AttribInfo", which for each attribute answers
questions like, is the attribute an array, is it mandatory, is a field associated
with it or is it in temporary in memory, is it an object, which checks need
to be performed, are the old values memorized? These informations are
preset in the constructor if the code is optimized so that the all checks can
be decided and done at runtime, rather to generate the code statically.
MapAttribute binds the attribute name and the corresponding fields into a list
called "ContextFieldS". This allows to instanciate a class independently from
the document it is working on.
As LSALibOCRun is a full runtime environment, it wrapps
"LSALibFct" which in turn uses "LSALibMsgH"
"LSALibMsgHOCRun"
"LSALibOCIMgr"
"LSALibOFMgr"
and also uses itself routines from the Function library "LSALibFct" and the Message
handler MsgH. It needs no configuration.
- Author:
-
LPS EMEA
- Version:
-
2.0 28.MAR.2000
- History:
| 28.MAR.2000 | ESc | Reworked for docu standards
04.OCT.2000 ESc invalid call of GetAttribByNameCstr. Parenthesis missing
25.OCT.2000 ESc If in backend the automatic read of field values requested by NULL malfunctioned
|
| Method Summary |
Sub MapAttribute (ThisInstance As Variant, AttribName As String, FieldName As String) |
Function PropertyGet (ThisInstance As Variant, AttribName As String) As Variant |
Function PropertyOldGet (ThisInstance As Variant, AttribName As String) As Variant |
Sub PropertyOldSet (ThisInstance As Variant, AttribName As String, thisValue As Variant) |
Sub PropertySet (Byval ThisInstance As Variant, AttribName As String, ThisValue As Variant) |
PropertyGet
Public Function PropertyGet(ThisInstance As Variant,AttribName As String) As Variant
retrieves the value of the requested attribute from the Instance. This can be the associated
field value or an in memory value. The value is a string, Number or an array of such depending
on the type of the attribute.
- Parameters:
| ThisInstance | Variant | wich makes available the attribute infos ,mapping etc.
|
| AttribName | String | wich names the Attribute and used as pointer into the attrib infos.
@Return Variant with the value like string, number, date or an array of such.
|
- See also:
- History:
PropertySet
Public Sub PropertySet(Byval ThisInstance As Variant,AttribName As String,ThisValue As Variant)
checks and then sets the value of the attribute provided from the Instance. This can be the associated
field or an in memory attribute. The value can be anything and a conversion is performed. If the check
fails, a GeneralError is issued.
If the value is NULL it will automaticly read that value from the corresponding UIDocument's field or
if this is empty, i.e we are in backend mode, from the Notes field.
- Parameters:
| ThisInstance | Variant | wich makes available the attribute infos, mapping etc.
|
| AttribName | String | wich names the Attribute and used as pointer into the attrib infos.
|
| ThisValue | Variant | a string, number, date or an array of such.
|
- Errors:
| ErrGeneral | in case of system errors expecially 13 type mismatch
|
- See also:
- History:
| 25.OCT.2000 | ESc | If in backend the automatic read of field values requested by NULL malfunctioned
|
PropertyOldGet
Public Function PropertyOldGet(ThisInstance As Variant,AttribName As String) As Variant
retrieves the old value of the requested old attribute from the instance. This can be the associated
field value or an in memory value. The value is a string, Number or an array of such depending
on the type of the attribute.
If the old value is NULL we need to read from disk as the value is left uninitialized.
Otherwise can assume that the old value are captured already.
In order to distinguish these cases we use the ContextUIDoc. If you initialize your Class in the
Postopen, you provide it with an associated UI Document, we can memorize the old values
immediately from the document in memory. If we have a backend document only, especially
one which has been processed in the browser we just initialize the value to NULL and get the
old values from disk now. Reason for doing so is, that there
is no be an appropriate place to save tthe old values, e.g. in a WEBQuerySave agent.
- Parameters:
| ThisInstance | Variant | wich makes available the attribute infos ,mapping etc.
|
| AttribName | String | wich names the Attribute and used as pointer into the attrib infos.
@Return Variant with the value like string, number, date or an array of such.
|
- See also:
- History:
PropertyOldSet
Public Sub PropertyOldSet(ThisInstance As Variant,AttribName As String,thisValue As Variant)
Resets the old value of the attribute provided from the Instance. The value can be anything
and a conversion is tried. If the check fails, it a GeneralError is issued.
If the old value is set to NULL this requests a lazy initialization.
- Parameters:
| ThisInstance | Variant | wich makes available the attribute infos ,mapping etc.
|
| AttribName | String | wich names the Attribute and used as pointer into the attrib infos.
|
| ThisValue | Variant | NULL, or a string, number, date or an array of such.
|
- Errors:
| ErrGeneral | in case of system errors expecially 13 type mismatch
|
- See also:
- History:
MapAttribute
Public Sub MapAttribute(ThisInstance As Variant,AttribName As String,FieldName As String)
The main porpose of this routine is to do the binding between the attribute and the field
name in the context document, that the instance operates on. These mappings are maintained
in the instance variable 'ContextFields'. As this is earliest time to know, where to get an existing
value from, the old value is initialized.
- Parameters:
| ThisInstance | Variant | wich makes available the attribute infos ,mapping etc.
|
| AttribName | String | wich names the Attribute and used as pointer into the attrib infos.
|
| FieldName | String | wich gived the field coresponding to the Attribute.
|
- Errors:
| ErrAttribNotFound | The attribute is in memory only.
|
- See also:
- History:
| 04.OCT.2000 | ESc | invalid call of GetAttribByNameCstr. Parenthesis missing
|
| Top | LotusScript Doc |
| © Lotus Professional Services |
| generated on : 05-Apr-01 10:01:44 AM |